#@layout()
<script>
    $("#permission-add").validate({
        rules:{
        
        
                "permission.permission":{
                    required:true
                },
        
        
                "permission.name":{
                    required:true
                },
        
        
                "permission.role_id":{
                    required:true
                }
        
        },
        messages:{

        
        
                "blog.permission":{
                required:"请输入权限操作..."
                },
        
        
                "blog.name":{
                required:"请输入权限名称..."
                },
        
        
                "blog.role_id":{
                required:"请输入角色..."
                }
        
        },
        onkeyup:false,
        focusCleanup:true,
        success:"valid",
        submitHandler:function(form){
        var config = {
        "url":"/admin/permission/doAdd",
        data:$("#permission-add").serialize(),
        "method":"POST"
        };
        var backendTool = new BackendTool(config);
        backendTool.ajaxRequest();
        }
    });
</script>
#define main()
     <form class="form form-horizontal" id="permission-add">
        #include("permission-form.html")
     </form>
#end